<%@ Page Language="VB" MasterPageFile="~/site.master" AutoEventWireup="false" codefile="Gallery.aspx.vb" Inherits="Gallery" %>

<%@ Register TagPrefix="uc1" TagName="FixtureList" Src="FixtureList.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="server">

    <uc1:FixtureList ID="FixtureList1" Runat="server" />
    
    <asp:sqldatasource id="SqlDataSource1" runat="server"
        selectcommand="SELECT [Notes], [PictureURL], [UploadedByMemberName] FROM [Gallery] WHERE ([FixtureID] = @FixtureID)"
        connectionstring="<%$ ConnectionStrings:WroxUnited %>">
        <SelectParameters>
            <asp:ControlParameter Name="FixtureID" Type="Int32" ControlID="FixtureList1" PropertyName="SelectedValue"></asp:ControlParameter>
        </SelectParameters>
    </asp:sqldatasource>
    
    <asp:datalist id="DataList1" runat="server" datasourceid="SqlDataSource1"
        repeatcolumns="4">
        <ItemTemplate>
            <asp:image id="PictureImage" runat="server" ImageUrl='<%# Eval("PictureURL", "~/MatchImages/{0}") %>'></asp:image>
            <asp:Label id="NotesLabel" runat="server" Text='<%# Eval("Notes") %>'></asp:Label>
            <br />
            Uploaded by <asp:Label id="UploadedByMemberNameLabel" runat="server" Text='<%# Eval("UploadedByMemberName") %>'></asp:Label>
        </ItemTemplate>

<ItemStyle VerticalAlign="Top"></ItemStyle>
    </asp:datalist>
    
</asp:Content>
